package com.rain.task.job;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author Rain
 * @version 1.0
 * @create 2021-5-5-005 19:21
 */
@Component
public class Test01 {
    @Scheduled(cron = "0/5 * * * * ?")
    public void testSpringTask() {
        System.out.println("5秒一次" + new Date());
    }
}
